package de.pharmacontrol.rfcserver;

import com.sap.conn.jco.server.JCoServer;
import com.sap.conn.jco.server.JCoServerContextInfo;
import com.sap.conn.jco.server.JCoServerErrorListener;
import com.sap.conn.jco.server.JCoServerExceptionListener;

public class PceRfcErrorListener implements JCoServerErrorListener, JCoServerExceptionListener {

	public void serverErrorOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Error error) {
		System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId + " (" + error.getMessage()+ ")");
		error.printStackTrace();
	}

	public void serverExceptionOccurred(JCoServer jcoServer, String connectionId, JCoServerContextInfo serverCtx, Exception error) {
		System.out.println(">>> Error occured on " + jcoServer.getProgramID() + " connection " + connectionId + " (" + error.getMessage()+ ")");
		error.printStackTrace();
	}
}
